<?php

include './query.php';

session_start();

$phone = $_POST['phone'];
$cupon = $_POST['cupon'];
error_log($phone);
$ret = update_member_coupon($phone, $cupon);
if (! $ret) {
	$_SESSION['callback'] = '/wine/admin.php';
	// header('Location: /wine/error.php');
	echo 'error';
}

// header('Location: /wine/admin.php');
echo 'ok';

?>
